class Restaurant():
	
	'''餐厅类'''
	
	def __init__(self,restaurant_name,restaurant_type):
		self.restaurant_name = restaurant_name
		self.restaurant_type = restaurant_type
		self.number_served = 0    #给属性指定默认值
	
	def describe_restaurant(self):
		print('餐馆名：'+self.restaurant_name)
		print('餐馆类型：'+self.restaurant_type)
	
	def open_restaurant(self):
		print(self.restaurant_name+'正在营业!欢迎进来恰饭！！！！')
	
	def set_number_served(self,number):
		self.number_served = number
		
	def increment_number_served(self,number):
		self.number_served += number
		

new_01_restaurant=Restaurant('狗蛋','中餐厅')
new_01_restaurant.open_restaurant()

'''修改属性值'''
new_01_restaurant.set_number_served(23) #通过方法设置用餐人数
new_01_restaurant.number_served=23 #直接设置用餐人数
new_01_restaurant.increment_number_served(23)  #通过方法增加用餐人数

print('有'+str(new_01_restaurant.number_served)+'个人在'
	+new_01_restaurant.restaurant_name
	+new_01_restaurant.restaurant_type+'吃！')




